package com.woniu.springboot.mapper;

import com.woniu.springboot.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Collection;
@Mapper
@Repository
public interface DepartmentMapper {

    @Select("select * from t_dept")
    Collection<Department> getDepartments();

    @Select("select * from t_dept where did = #{id}")
    Department getDepartment(Integer id);
}
